package ink.yuanchu.picachoframework.service.impl;

import ink.yuanchu.picachoframework.entity.File;
import ink.yuanchu.picachoframework.dao.FileMapper;
import ink.yuanchu.picachoframework.service.FileService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ziyuan
 * @since 2021-04-02
 */
@Service
public class FileServiceImpl extends ServiceImpl<FileMapper, File> implements FileService {

    @Autowired
    private FileMapper fileMapper;

    @Override
    public Boolean saveFileInfo(File file) {
        int insert = fileMapper.insert(file);
        if (insert != 0) {
            return true;
        } else {
            return false;
        }
    }
}
